# $Id: PKGBUILD 89193 2013-04-27 19:49:51Z dwallace $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: K900 <k0009000@gmail.com>
pkgname=steam
pkgver=1.0.0.38
pkgrel=1
pkgdesc="Digital distribution client bootstrap package"
arch=("i686" "x86_64")
url="http://steampowered.com/"
license=('custom')
if [[ "$CARCH" == "x86_64" ]]; then
  #depends+=(lib32-libgl lib32-mesa-libgl lib32-gcc-libs lib32-libx11)
  optdepends=(
  'lib32-ati-dri: for open source ATI driver users'
  'lib32-catalyst-utils: for AMD Catalyst users'
  'lib32-intel-dri: for open source Intel driver users'
  'lib32-nouveau-dri: for Nouveau users'
  'lib32-nvidia-utils: for NVIDIA proprietary blob users'
  'lib32-flashplugin: for flash video'
  )
build() {
    patch -d "$pkgname" -Np1 -i "$srcdir/lib32-flashplugin-path.patch"
    patch -d "$pkgname" -Np1 -i "$srcdir/alsa_sdl_audiodriver.patch"
}
else
    optdepends=('flashplugin: for flash videos')
build() {
    patch -d "$pkgname" -Np1 -i "$srcdir/alsa_sdl_audiodriver.patch"
}
fi
install=steam.install
source=("http://repo.steampowered.com/$pkgname/pool/$pkgname/s/$pkgname/${pkgname}_$pkgver.tar.gz"
        'lib32-flashplugin-path.patch'
        'alsa_sdl_audiodriver.patch')
md5sums=('9a402f52ff7be2713f0b7dcee4ec112a'
         '1d83a1df55d677f35ce415e0750f4448'
         'ac0e03d70f1101331598b2b32ed9bac3')

package() {
    depends=(
      'bash' 'desktop-file-utils' 'hicolor-icon-theme' 'curl'
      'dbus' 'freetype2'  'gdk-pixbuf2' 'ttf-font' 'zenity'
      )
  if [[ "$CARCH" == x86_64 ]]; then
    depends+=(lib32-libgl lib32-gcc-libs lib32-libx11)
  fi

  # Install license
  make -C "$pkgname" DESTDIR="$pkgdir" install
  
  install -Dm644 "$pkgdir/usr/share/doc/steam/steam_install_agreement.txt" "$pkgdir/usr/share/licenses/steam/LICENSE"

  # blank steamdeps because apt-get
  ln -sf /bin/true "$pkgdir/usr/bin/steamdeps"
}
#vim: set ft=PKGBUILD sw=2 ts=2 et
